<html><head><title>Plot the output of a LGS experiment as a genome scan</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>plotLGS(LGS)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   plotLGS">
<param name="keyword" value=" Plot the output of a LGS experiment as a genome scan">
</object>


<h2>Plot the output of a LGS experiment as a genome scan</h2>


<h3>Description</h3>

<p>
<code>plotLGS</code> plots marker allele ratios vs genome position to produce an overview of a genome scan. Typically it takes the output from <code>simLGS</code>. User's specified values to plot real or simulated data can also be supplied. Optional graphs to summarize the progeny population before and after selection are also implemented.
</p>


<h3>Usage</h3>

<pre>
plotLGS(simLGS = NULL, cumDist = simLGS$ChrMap$CumDist, chr = simLGS$ChrMap$Chr, allRatio = simLGS$ChrMap$LGS, width.cm = 23/2.54, height.cm = 11/2.54, barp = FALSE, add = FALSE, show.range = TRUE, new.window = TRUE, ...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>simLGS</code></td>
<td>
Output list from <code>simLGS</code>. Leave <code>NULL</code> if user's values are supplied.</td></tr>
<tr valign="top"><td><code>cumDist</code></td>
<td>
Vector of cumulative marker distances.</td></tr>
<tr valign="top"><td><code>chr</code></td>
<td>
Vector of chromosomes names corresponding to the respective markers.</td></tr>
<tr valign="top"><td><code>allRatio</code></td>
<td>
Vector of allele ratios. </td></tr>
<tr valign="top"><td><code>width.cm</code></td>
<td>
Width and height of the plotted window.</td></tr>
<tr valign="top"><td><code>height.cm</code></td>
<td>
</td></tr>
<tr valign="top"><td><code>barp</code></td>
<td>
Should a barplot of population composition be shown? </td></tr>
<tr valign="top"><td><code>add</code></td>
<td>
Should the data be overplotted on the current graph? </td></tr>
<tr valign="top"><td><code>show.range</code></td>
<td>
Show mean and sd of the allele ratios. </td></tr>
<tr valign="top"><td><code>new.window</code></td>
<td>
Close the current device before opening the new one. </td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
Further arguments to be passed to <code>plot</code> e.g. <code>col</code>. </td></tr>
</table>

<h3>Details</h3>

<p>
If the output of <code>simLGS</code> is supplied to <code>simLGS</code>, no other argument needs to be specified. Otherwise, <code>cumDist, chr</code> and <code>allRatio</code> have to be given.
It is useful to set width and height to easily compare different scans using plots of the same size. However, the set size might not correspond exactly with the actual one.
<code>barp</code> can be used only if <code>simLGS</code> is given since it requires the appropriate matrices. It might not be very meaningful if the two parental strains are recombinants.
<code>show.range</code> will plot horizontal lines corresponding to: mean of allele ratios (solid, grey), mean +/- 2sd (dashed, grey) and mean +/- 3sd (dashed, red). Not plotted if <code>add = TRUE</code>.
Marker positions are shown as a rug. Chromosome boundaries are marked by vertical lines.
If <code>simLGS</code> is supplied as input, markers with selection coeffiecients greater than 0 or less than 0 (from <code>simLGS$ChrMap$SelCoef</code>) will be plotted as blue and red dots, respectively.
</p>


<h3>Value</h3>

<p>
A plot is returned on the current device.</p>

<h3>Author(s)</h3>

<p>
Dario Beraldi <a href="mailto:dario.beraldi@ed.ac.uk">dario.beraldi@ed.ac.uk</a>
</p>


<h3>See Also</h3>

<p>
<code><a href="simLGS.html">simLGS</a></code>
</p>


<h3>Examples</h3>

<pre>
# Simulate a genome with 8 chromosomes, 3 to 10 markers/chromosome
genome&lt;- sort(rnorm(n= 52, mean= 10, sd= 3))
chromos&lt;- rep(1:8, times=3:10)
allr&lt;- biasLGS(rep(0.5, 52)); allr[20]&lt;- 0.01 # Selection on the second marker on chr 2
plotLGS(cumDist=genome, chr= chromos, allRatio= allr)

# Add another profile and change line style
allr2&lt;- biasLGS(rep(0.7, 52)); allr2[30]&lt;- 0.1 # Selection on the second marker on chr 2
plotLGS(cumDist=genome, chr= chromos, allRatio= allr2, add=TRUE, col="blue", lty="dotted")
</pre>



<hr><div align="center">[Package <em>LGS</em> version 1.0 <a href="00Index.html">Index]</a></div>

</body></html>
